﻿namespace Singleton
{
    public class CacheManage
    {
        private static CacheManage instance = null;
        private static readonly object syncRoot = new object();
        private CacheManage() { }

        public static CacheManage GetInstance()
        {
            if(instance == null)
            {
                lock (syncRoot)
                {
                    if(instance == null)
                    {
                        instance = new CacheManage();
                    }
                }
            }
            return instance;
        }

        public object GetCache(int id)
        {
            return new object();
        }

    }
}
